import { createRouter,createWebHashHistory} from 'vue-router'

// 路由配置
const routes = [
    
        {
         path:'/',   //第一次访问路径，重定向   
         redireact:'/login'
        },
        {
            path:'/login',
            name:'login',
            component: () => import('../views/login/index.vue')
        },
        {
            path:'/home',
            name:'home',
            component: () => import('../views/home/index.vue')
        },
        
    
]

const router = createRouter({
  history:createWebHashHistory(),  //路由模式：hash模式
  routes:routes
})
export default router